﻿using WebApplication1.Security;

namespace WebApplication1.Data
{
    public class TestUser : RedisAuthUser
    {
    }
    public class TestUserList
    {
        public static List<TestUser> testUsers = new List<TestUser>();
        static TestUserList()
        {
            testUsers.Add(new TestUser { Id = "1", UserName = "test1", Roles = new List<string> { "admin" } });
            testUsers.Add(new TestUser { Id = "2", UserName = "test2", Roles = new List<string> { "none" } });
            testUsers.Add(new TestUser { Id = "3", UserName = "test3", Roles = new List<string> { "normal" } });
            testUsers.Add(new TestUser { Id = "4", UserName = "test4", Roles = new List<string> { "vip" } });
        }
        public static TestUser? GetTestUserById(string id)
        {
            return testUsers.Where(u => u.Id.Equals(id)).SingleOrDefault();
        }

    }
}
